Misc minor internal code cleanups.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 7 Dec 2014 23:46:57 +0000 (23:46 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 7 Dec 2014 23:46:57 +0000 (23:46 +0000)
Reduce header chain includes.  ex. move things from defs.h (where they'd get
 compiled for every file) to places that actually needed them.
Try to bring some sanity to includes and order and remove a lot of our C-era
includes.
(I know this is going to come back to byte me...)

114 files changed:
gpsbabel/GPSBabel.xcodeproj/project.pbxproj
gpsbabel/GPSBabel.xcodeproj/project.xcworkspace/xcuserdata/robertlipe.xcuserdatad/UserInterfaceState.xcuserstate
gpsbabel/GPSBabel.xcodeproj/xcuserdata/robertlipe.xcuserdatad/xcschemes/GPSBabel.xcscheme
gpsbabel/alan.cc
gpsbabel/an1.cc
gpsbabel/arcdist.cc
gpsbabel/bcr.cc
gpsbabel/bend.cc
gpsbabel/brauniger_iq.cc
gpsbabel/cet.cc
gpsbabel/cet.h
gpsbabel/cet_util.cc
gpsbabel/cet_util.h
gpsbabel/compegps.cc
gpsbabel/cst.cc
gpsbabel/csv_util.cc
gpsbabel/defs.h
gpsbabel/delgpl.cc
gpsbabel/destinator.cc
gpsbabel/dmtlog.cc
gpsbabel/duplicate.cc
gpsbabel/easygps.cc
gpsbabel/energympro.cc
gpsbabel/enigma.cc
gpsbabel/exif.cc
gpsbabel/filter_skeleton.cc
gpsbabel/format_skeleton.cc
gpsbabel/formspec.cc
gpsbabel/garmin_fit.cc
gpsbabel/garmin_fs.h
gpsbabel/garmin_gpi.cc
gpsbabel/garmin_tables.cc
gpsbabel/garmin_txt.cc
gpsbabel/garmin_xt.cc
gpsbabel/gbfile.cc
gpsbabel/gbfile.h
gpsbabel/gdb.cc
gpsbabel/geo.cc
gpsbabel/ggv_ovl.cc
gpsbabel/glogbook.cc
gpsbabel/gnav_trl.cc
gpsbabel/google.cc
gpsbabel/googledir.cc
gpsbabel/gopal.cc
gpsbabel/gpssim.cc
gpsbabel/gpsutil.cc
gpsbabel/gpx.cc
gpsbabel/grtcirc.cc
gpsbabel/gtrnctr.cc
gpsbabel/gui/setup.iss
gpsbabel/height.cc
gpsbabel/holux.cc
gpsbabel/html.cc
gpsbabel/humminbird.cc
gpsbabel/igc.cc
gpsbabel/ignrando.cc
gpsbabel/igo8.cc
gpsbabel/ik3d.cc
gpsbabel/inifile.cc
gpsbabel/itracku.cc
gpsbabel/jogmap.cc
gpsbabel/jtr.cc
gpsbabel/kml.cc
gpsbabel/lmx.cc
gpsbabel/lowranceusr.cc
gpsbabel/lowranceusr4.cc
gpsbabel/maggeo.cc
gpsbabel/magproto.cc
gpsbabel/mapasia.cc
gpsbabel/mapfactor.cc
gpsbabel/mapsend.cc
gpsbabel/mapsource.cc
gpsbabel/mkicondoc.cc
gpsbabel/mmo.cc
gpsbabel/mtk_locus.cc
gpsbabel/mtk_logger.cc
gpsbabel/mynav.cc
gpsbabel/naviguide.cc
gpsbabel/navilink.cc
gpsbabel/navitel.cc
gpsbabel/parse.cc
gpsbabel/pcx.cc
gpsbabel/pocketfms_fp.cc
gpsbabel/position.cc
gpsbabel/psitrex.cc
gpsbabel/queue.cc
gpsbabel/saroute.cc
gpsbabel/sbn.cc
gpsbabel/sbp.cc
gpsbabel/skyforce.cc
gpsbabel/skytraq.cc
gpsbabel/stmsdf.cc
gpsbabel/subrip.cc
gpsbabel/swapdata.cc
gpsbabel/tiger.cc
gpsbabel/tmpro.cc
gpsbabel/tpg.cc
gpsbabel/tpo.cc
gpsbabel/trackfilter.cc
gpsbabel/unicsv.cc
gpsbabel/v900.cc
gpsbabel/vecs.cc
gpsbabel/vidaone.cc
gpsbabel/vitosmt.cc
gpsbabel/vitovtt.cc
gpsbabel/vpl.cc
gpsbabel/waypt.cc
gpsbabel/wbt-200.cc
gpsbabel/wfff_xml.cc
gpsbabel/xmlgeneric.cc
gpsbabel/xmlgeneric.h
gpsbabel/xmltag.cc
gpsbabel/xol.cc
gpsbabel/yahoo.cc

index e6872419a758c5a8145005446df81767cd399375..d2908e0af1697cc7593c57a326dc1be63adca182 100644 (file)
                6DB9C3763D02B1415CD9D565 /* Project object */ = {
                        isa = PBXProject;
                        attributes = {
-                               LastUpgradeCheck = 0500;
+                               LastUpgradeCheck = 0610;
                        };
                        buildConfigurationList = DAC4C1AA5EDEA1C85E9CA5E6 /* Build configuration list for PBXProject "GPSBabel" */;
                        compatibilityVersion = "Xcode 3.2";
                                CLANG_WARN_EMPTY_BODY = YES;
                                CLANG_WARN_ENUM_CONVERSION = YES;
                                CLANG_WARN_INT_CONVERSION = YES;
+                               CLANG_WARN_UNREACHABLE_CODE = YES;
                                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                                COPY_PHASE_STRIP = YES;
                                DYLIB_COMPATIBILITY_VERSION = 1.0;
                                DYLIB_CURRENT_VERSION = 1.0.0;
+                               ENABLE_STRICT_OBJC_MSGSEND = YES;
                                FRAMEWORK_SEARCH_PATHS = (
                                        /Users/robertlipe/Qt5.2.1/5.2.1/clang_64/lib,
                                        /Users/robertlipe/Qt5.2.1/5.2.1/clang_64/lib,
                                CLANG_WARN_EMPTY_BODY = YES;
                                CLANG_WARN_ENUM_CONVERSION = YES;
                                CLANG_WARN_INT_CONVERSION = YES;
+                               CLANG_WARN_UNREACHABLE_CODE = YES;
                                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                                COPY_PHASE_STRIP = NO;
                                DYLIB_COMPATIBILITY_VERSION = 1.0;
                                DYLIB_CURRENT_VERSION = 1.0.0;
+                               ENABLE_STRICT_OBJC_MSGSEND = YES;
                                FRAMEWORK_SEARCH_PATHS = (
                                        /Users/robertlipe/Qt5.2.1/5.2.1/clang_64/lib,
                                        /Users/robertlipe/Qt5.2.1/5.2.1/clang_64/lib,
index 040d732b88c73b3c79d4d788632795e5765c5740..b2b656810b4284fc5b8c0ec2d85106b70f6aa93e 100644 (file)
Binary files a/gpsbabel/GPSBabel.xcodeproj/project.xcworkspace/xcuserdata/robertlipe.xcuserdatad/UserInterfaceState.xcuserstate and b/gpsbabel/GPSBabel.xcodeproj/project.xcworkspace/xcuserdata/robertlipe.xcuserdatad/UserInterfaceState.xcuserstate differ
index d354ba9b63a113b81a771ffe06243c7364d12a3d..86607d61c31fc3d7460ea6c7be7d0a662a269665 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0500"
+   LastUpgradeVersion = "0610"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"
index 0e7f77113fdbd8562c27e57fe7c26419b0b80de5..1178ce221d6446992490ff8dddd9dba79ec731e6 100644 (file)
 
  */
 
-#include <stdio.h>
-#include <time.h>
 #include "defs.h"
 
-
 #define MYNAME "alan"
 
 #define MAXWPT      1000               /* old 500 */
index 4638c21a1a4d872f782e2696069ba4ec2080dcef..769f17250025152ee67eb0ca6549b0ffb7893a47 100644 (file)
 
  */
 
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
-#include <limits.h>
+#include "defs.h"
 
 #define MYNAME "an1"
-#include "defs.h"
 
 static gbfile* infile;
 static gbfile* outfile;
index d3916c66b3c18472c7eaf1213a1e477904bc3576..45053f9058780bfbf4596474d5dd28d9e6edb73b 100644 (file)
 
  */
 
-#include <math.h>
 
 #include "defs.h"
 #include "filterdefs.h"
 #include "grtcirc.h"
 
+#include <math.h>
+
 #if FILTERS_ENABLED
 #define MYNAME "Arc filter"
 
index d71d48a24e474f216f3a556a9edf0e38ccb9c265..4dbbf260ae780a13afa6614f5639326ee0cdee5f 100644 (file)
 #include "defs.h"
 #include "csv_util.h"
 #include "garmin_tables.h"
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
 #include "cet_util.h"
 #include "inifile.h"
+#include <math.h>
 
 #define MYNAME "bcr"
 
index 15d89c7bac462eaabc6d3d9497b36c3d534fb69a..44d03592b97a4871604cee836374c68af2626c06 100644 (file)
 
 #include "defs.h"
 #include "filterdefs.h"
-
 #include "grtcirc.h"
 
-#include <ctype.h>
+#include <cmath>
 
 #define MYNAME "bend"
 
@@ -109,9 +108,9 @@ is_small_angle(double lat_orig, double long_orig, double lat_orig_prev,
 
   double heading_diff = heading_next - heading_prev;
 
-  return ((abs(heading_diff - 0.0) < minAngle)
-          || (abs(heading_diff - 180.0) < minAngle)
-          || (abs(heading_diff - 360.0) < minAngle));
+  return ((std::abs(heading_diff - 0.0) < minAngle)
+          || (std::abs(heading_diff - 180.0) < minAngle)
+          || (std::abs(heading_diff - 360.0) < minAngle));
 }
 
 static void
index aa76cef7de0ae01fd32ed9e3b8fb7414b6876646..35b65c0b9bf9bf05b4debaf70d475b8ac6ff99f6 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "defs.h"
 #include "gbser.h"
-#include <errno.h>
 
 static void* serial_handle;
 
index 73dfd93c1e97f6a6ef54676c0b4f5e07839c14bc..aeaf06a7b7b322a8410a460aaab5502ca82b05ee 100644 (file)
 #include "defs.h"
 #include "cet.h"
 
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 /* ! ALL vec PARAMETERS HAVE TO BE A VALID POINTER TO A cet_cs_vec_t RECORD  ! */
 
 /* =========================================================================== */
index 0ba38236536c2e2c03ed6e330ce02e2d38ab7420..62f85b80d9c17a5cf6c010b4b4ce96859dbb1b91 100644 (file)
@@ -22,9 +22,6 @@
 #ifndef CET_H
 #define CET_H
 
-#include <ctype.h>
-#include <stdio.h>
-
 #define CET_ERROR      1
 #define CET_SUCCESS    0
 
index db70e12752d53c20df4ea507768b7f48ce6ca3b0..39c1978ef46faf5110b370d89d80e6dd56769a2a 100644 (file)
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 */
 
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
 #include "defs.h"
 #include "cet.h"
 #include "cet_util.h"
index c8a58a95f7ef6fcf4b3549a3e2c3e4e10447e7ea..925cdae51bb049f9857a6e0c948701b9f66427e1 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef CET_UTIL_H
 #define CET_UTIL_H
 
-#include <ctype.h>
-#include <stdio.h>
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
index b6a57f3c1db9092af19fb1ce09c25d91dfe7275b..ef0950efb55759f5bb5bd3b1795dc7f9268e11b5 100644 (file)
 #include "csv_util.h"
 
 #if CSVFMTS_ENABLED
-#include <ctype.h>
 #include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
 #include "jeeps/gpsmath.h"
 
 #define MYNAME "CompeGPS"
index f5f1f06308d7b10d37e7abec4bf8dbdb06a8c0a7..f4b5ea6b9f742306651e0eca7bf5e2482bf83fcc 100644 (file)
 
 #include "defs.h"
 #include "strptime.h"
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 
 #define MYNAME "cst"
 
index 4bf9d01ceb8629f7b729a70e2ed20535c6cbeaef..35692fa73a91ed09419c1d45da17c4fba91c9b46 100644 (file)
@@ -20,9 +20,6 @@
 
  */
 
-#include <ctype.h>
-#include <math.h>
-#include <stdlib.h>
 #include <QtCore/QRegExp>
 
 #include "defs.h"
@@ -33,6 +30,8 @@
 #include "src/core/logging.h"
 #include "strptime.h"
 
+#include <math.h>
+
 #define MYNAME "CSV_UTIL"
 
 /* macros */
index 11c6315c35fe441f06fdf1b09bf963de4ed60c79..52df64c1a264041637dc8ea014f2cf09394d9b44 100644 (file)
@@ -37,9 +37,6 @@
 #include "session.h"
 
 #include <QtCore/QString>
-#include <QtCore/QDebug>
-#include <QtCore/QTextCodec>
-#include <QtCore/QTextStream>
 
 # include "src/core/datetime.h"
 
@@ -208,6 +205,7 @@ extern const char gpsbabel_version[];
 extern time_t gpsbabel_now;    /* gpsbabel startup-time; initialized in main.c with time() */
 extern time_t gpsbabel_time;   /* gpsbabel startup-time; initialized in main.c with current_time(), ! ZERO within testo ! */
 extern int geocaches_present;
+class QTextStream;
 extern QTextStream cerr;
 
 #define MILLI_TO_MICRO(t) (t * 1000)  /* Milliseconds to Microseconds */
index e62f67101a4054d14b991151d541659ccce895b8..bb9a29d698c79c8680539402d03c7af83fe91e45 100644 (file)
@@ -19,9 +19,6 @@
 
  */
 
-#include <ctype.h>
-#include <time.h>
-
 #include "defs.h"
 
 #define MYNAME "GPL"
index 29588dcb4cb4499ae0f6aadf9bc2f1ee8c8623de..3a8fd5e4e389a3e5627f5b6f1812b1e6e4e25318 100644 (file)
 
  */
 
-#include <ctype.h>
-#include <math.h>
-#include <time.h>
-
 #include "defs.h"
 #include "cet.h"
 #include "cet_util.h"
 #include "garmin_fs.h"
 #include "strptime.h"
+#include <cmath>
 
 #define MYNAME                 "destinator"
 #define DST_DYN_POI    "Dynamic POI"
index a04ead1a4b9ca99c6b63449c177990397adb00b9..4a5679570706070f35748fa117ab52fbdc799309 100644 (file)
 #include "jeeps/gpsmath.h"
 #include "xmlgeneric.h"
 
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-
 #define MYNAME "dmtlog"
 
 #define DEFLATE_BUFF_SIZE 16384
index 770d851d7eff9b21f765241dd61abf1cd7b15c2e..a5ca5e81f0f1552f785a6cb4286b2cf04a6801a7 100644 (file)
@@ -18,7 +18,6 @@
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 
  */
-#include <stdio.h>
 #include "defs.h"
 #include "filterdefs.h"
 
index 90fbd8ebd04c03dac2066f5ff47c0225cbab89e7..686412c25ff5bdf9f54ca6d35cd40d60ff465c75 100644 (file)
@@ -20,7 +20,6 @@
 
 
 #include "defs.h"
-#include <ctype.h>
 
 static gbfile* file_in;
 static gbfile* file_out;
index d4fe89477c7b81269daa4328cf35e41f977cf3fd..99bca0ee6101ecfd1fce7ab73d88e227454aba52 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #include "defs.h"
-#include <ctype.h>
+#include <QtCore/QDebug>
 #include <limits.h>
 
 #define MYNAME "energympro"
index 9ccec1f281543841054e5135e5d949bfa72162e9..0d4e9ce68753a4808c6725158f2922866a9779e9 100644 (file)
@@ -21,9 +21,8 @@
 
  */
 
-#include <math.h>
-
 #include "defs.h"
+#include <math.h>
 
 #define MYNAME "Enigma binary route and waypoint file format"
 
index 26795b4cadc35af5edaa902313d6d293daceec87..53ce8428228641c66e0c852cd17b79ad32c18d99 100644 (file)
  * 1998, version 2.1: http://www.exif.org/Exif2-1.PDF
  */
 
-#include <ctype.h>
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "defs.h"
 #include "garmin_tables.h"
 #include "jeeps/gpsmath.h"
 
+#include <math.h>
+
 #define MYNAME "exif"
 
 // #define EXIF_DBG
index be453505487692f6cfd2eb500837aabbb2fb2b5c..0c0f8e3d0ddfa7fe2add183ee0df643a2e1f409a 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "defs.h"
 #include "filterdefs.h"
-#include <ctype.h>
 
 #define MYNAME "filter_skeleton"
 
index 71e4537ebbdb494d29f26f7beed6a3976d33e658..4d5aa88737ba3807aa187acc69904be16010be2c 100644 (file)
@@ -7,8 +7,8 @@
     1) Copy this file to <your_format_name>.c
     2) Rename all format_skeleton tokens to <your_format_name>.
     3) Replace the fictional name and address in the Copyright section below.
-       As your work is likely built on the work of others, please retain
-       the original line.
+       ** As your work is likely built on the work of others, please retain
+       the original line. **
     4) Create a new section in vecs.c.
     5) Add compilation instructions to Makefile.
     6) Add sample files (it's better when they're created by the "real"
@@ -37,7 +37,6 @@
  */
 
 #include "defs.h"
-#include <ctype.h>
 
 #define MYNAME "format_skeleton"
 
index 517143359886f50473d2ed18afc22bec73ca1d85..2974aa116dda10bb72f03d53637ecae27a0cecc8 100644 (file)
 
  */
 
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
-
 #include "defs.h"
 
 format_specific_data* fs_chain_copy(format_specific_data* source)
index 46b267571b475413fe13197ad4b0ff871c9233d5..6047ebf0e158f25838b3c8827e0303194170f353 100644 (file)
  */
 
 #include "defs.h"
-#include <ctype.h>
 
 #define MYNAME "fit"
 
-
 static
 arglist_t fit_args[] = {
   ARG_TERMINATOR
index 37eef297655097fe110fc774422ada1efaf5b461..90db68de4aee6d4e40c5f36424ba4b8e378fd1f0 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef GARMIN_FS_H
 #define GARMIN_FS_H
 
-#include <ctype.h>
 #include "defs.h"
 #include "jeeps/gps.h"
 
index ed524a24b78a5d0903ad4dd271107c28903016f3..08b8c95d738b55fe418d58f8c6fbf87851448cf7 100644 (file)
 #include "jeeps/gpsmath.h"
 #include "garmin_fs.h"
 #include "garmin_gpi.h"
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
+#include <QtCore/QTextCodec>
 
 #define MYNAME "garmin_gpi"
 
index f08d201edbeb304c6ac4605da70c223edf6af963..14ae1df1fccca2add76fa5ce764b32642af2a95c 100644 (file)
@@ -24,9 +24,6 @@
 #include "src/core/logging.h"
 #include "jeeps/gpsmath.h"
 
-#include <stdio.h>
-#include <string.h>
-
 #define MYNAME "garmin_tables"
 
 /* MapSource 4.13 */
index 4b5e33904f9d136390e3d622ce30a39c1c5162f2..d61159003eb416c5f68a6f4b4dc4c6b7084c06e6 100644 (file)
 #include "defs.h"
 
 #if CSVFMTS_ENABLED
-#include <math.h>
-#include <time.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdarg.h>
-#include "cet_util.h"
 #include "csv_util.h"
 #include "garmin_fs.h"
 #include "garmin_tables.h"
@@ -37,6 +31,8 @@
 #include "jeeps/gpsmath.h"
 #include "strptime.h"
 
+#include <cmath>
+
 #define MYNAME "garmin_txt"
 
 typedef struct gtxt_flags_s {
index fe067f553af853327463994f91030efe30662afc..12ada95bc205d80e767a71b8c969708403670ced 100644 (file)
@@ -24,7 +24,6 @@
 */
 
 #include "defs.h"
-#include <ctype.h>
 
 #define MYNAME "Garmin_XT"
 #define GARMIN_XT_ELE 31500/65536
index fb1462ecb79c505935924ee88b3059a39bcf353c..7a574cb3e4aeab60b105c5eaf53949dd3f5a095d 100644 (file)
 #include "gbfile.h"
 
 #include <assert.h>
-#include <ctype.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
 
 #if __WIN32__
 /* taken from minigzip.c (part of the zlib project) */
index 2aa17d3bdc82306a33184b5f895dc56ec43eca7e..e92c75db446b9d4fdb0ce48854d07c6db96f0136 100644 (file)
 #ifndef GBFILE_H
 #define GBFILE_H
 
-#include <ctype.h>
-#include <stdarg.h>
-#include <string.h>
-#include <QtCore/QString>
 
 #include "defs.h"
 #include "cet.h"
 
+#include <QtCore/QString>
+
 struct gbfile_s;
 typedef struct gbfile_s gbfile;
 typedef uint32_t gbsize_t;
index 0698570912a9a9e1694270374a4342dde4bcd24a..cac6b0fefb399c794f6f36171b045a3ce5055cea 100644 (file)
        Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 */
 
-/*
-       History:
-
-           2005/06/27: initial release (reader only)
-           2005/07/26: added write support
-           2005/07/27: replaced "tricky code" in route reader
-           2005/07/28: fixed handling of single point routes
-                       new option "via"
-                       new option "ver"
-                       fixed compiler warnings
-           2005/07/29: fixed compiler warnings
-           2005/08/04: Read/write URL (reference data changed)
-           2005/08/11: Display sym and name in GDB
-           2005/08/12: Neuter proximity and depth for now
-           2005/08/29: big CET merge
-           2005/09/13: Make sure routes have unique wpt names
-           2005/10/10: MSVC fixes from Andrew
-           2005/10/17: RJL: Tighten up types of a short handle.  It's now a "real" type and not a void *
-           2005/10/31: RJL: Add v3 format, min/max, provide defaults, data types, etc
-           2005/11/09: RJL: Clarify help text for dropping via points
-           2005/12/01: changed waypt's URL to descr for hidden waypoints (-> reference data changed)
-                       removed unused procedure gdb_add_to_hidden
-           2005/12/04: additional testo sequences
-           2006/02/24: last field of a route is rte url
-           2006/02/25: rte_read_loop: zero check replaced with a dummy read (8 unknown bytes)
-           2006/03/05: first implementation of Garmin special data (garmin_fs)
-           2006/04/04: Use track_add_wpt for all tracks
-           2006/04/19: add url i/o to tracks and routes
-           2006/04/19: check for empty waypoint shortnames (paranioa)
-           2006/11/01: Use version of GPSBabel and date/time of gdb.c (managed by CVS) for watermark
-           2007/01/23: add support for GDB version 3
-           2007/02/07: Add special code for unknown bytes in waypoints with class GE 8 (calculated points)
-           2007/02/15: Nearly full rewrite. Full support for GDB V3. New option roadbook.
-           2007/05/03: Add code for tricky V3 descriptions
-           2007/06/18: Tweak some forgotten "flagged" fields
-           2007/07/07: Better support for new fields since V3 (postal code/street address/instruction)
-           2008/01/09: Fix handling of option category (cat)
-           2008/04/27: Add zero to checklist of "unknown bytes"
-           2008/08/17: Add concept of route/track line colors
-           2008/09/11: Make format 'pipeable' (cached writes using gbfile memapi)
-*/
-
-#include <ctype.h>
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-
 #include "defs.h"
 
 #include "cet.h"
-#include "cet_util.h"
 #include "csv_util.h"
 #include "garmin_fs.h"
 #include "garmin_tables.h"
 #include "grtcirc.h"
 #include "jeeps/gpsmath.h"
+#include <cmath>
 
 #define MYNAME "gdb"
 
index 6d7a371350342a10129b39ba925b80278e8e230f..3a65f2402189d2ab50533a34d5a94f33d7328c4f 100644 (file)
 
  */
 #include "defs.h"
-
-static char* deficon = NULL;
-static char* nuke_placer;
-
-
-static gbfile* ofd;
-
 #include <QtCore/QXmlStreamReader>
 #include <QtCore/QXmlStreamWriter>
 #include <QtCore/QDebug>
 #include "src/core/file.h"
 
+static char* deficon = NULL;
+static char* nuke_placer;
+static gbfile* ofd;
 static QString ostring;
 static QXmlStreamWriter writer(&ostring);
 
index 2de58a82c25cb81c76a4a60d27f8fe6003743b56..7c195a2c6c3cc7dc0070ec0a499a453a037ee614 100644 (file)
 
  */
 
-#include <ctype.h>
-#include <math.h>
-#include <string.h>
-#include <stdlib.h>
-
 #include "defs.h"
 #include "inifile.h"
 #include "grtcirc.h"
 
+#include <cmath>
+
 #define MYNAME "ggv_ovl"
 
 static
index b22e6e094a07e3a74dcf3f76266e1b75aaad41e5..8568c0d97cbac2e01257e41499110ae5f47fcbd3 100644 (file)
 
  */
 
-#include <QtCore/QXmlStreamAttributes>
-#include <QtCore/QXmlStreamWriter>
-
 #include "defs.h"
 #include "xmlgeneric.h"
 #include "src/core/file.h"
 
+#include <QtCore/QXmlStreamAttributes>
+#include <QtCore/QXmlStreamWriter>
+
 static gbfile* ofd;
 static QString ostring;
 static QXmlStreamWriter writer(&ostring);
index d115a1bf424857da9371f3d6acbcd62c43095593..663ae3379cb9b2ec722908a6545b7773b17e5349 100644 (file)
@@ -20,7 +20,6 @@
 
  */
 
-#include <ctype.h>
 #include "defs.h"
 
 #define MYNAME "gnav_trl"
index 1cd22aaa622822a6fcc96498a51308bf8466382e..66900303200f41bf215475c66b607a631fda0d39 100644 (file)
 
  */
 
-#include <QtCore/QFile>
-#include <QtCore/QXmlStreamAttributes>
 
 #include "defs.h"
 #include "xmlgeneric.h"
+#include <QtCore/QFile>
+#include <QtCore/QTextStream>
+#include <QtCore/QXmlStreamAttributes>
 
 static char* encoded_points = NULL;
 static char* encoded_levels = NULL;
index 819c3d00149dd2c2aa51b25d80458c0c73b09577..6ed31e102ce816d91c5f4672649d1c5b655a208d 100644 (file)
  * https://developers.google.com/maps/documentation/directions/
  */
 
-#include <QtCore/QXmlStreamAttributes>
 
 #include "defs.h"
 #include "xmlgeneric.h"
+#include <QtCore/QXmlStreamAttributes>
 
 static QString encoded_points;
 static QString instructions;
index 3bdb511fda2324aa2d7750463a3321554d1e27bf..1b78d4649986a5baf2aa7ea1a69c40bdce027b2b 100644 (file)
 */
 
 #include "defs.h"
-#include <ctype.h>
 #include "csv_util.h"
-#include <time.h>
-#include <math.h>
 #include "strptime.h"
 #include "jeeps/gpsmath.h"
 #include "grtcirc.h"
+#include <cmath>
 #define MYNAME "gopal"
 
 static gbfile* fin, *fout;
@@ -317,7 +315,7 @@ gopal_read(void)
     }
     /* Error handling: in the tracklog of my device sometimes "jump" waypoints ;-) */
     if ((optclean) &&
-         (((wpt->longitude==0.0)|| (wpt->latitude==0.0)||(abs(wpt->latitude)>90)||(abs(wpt->longitude)>180))||
+         (((wpt->longitude==0.0)|| (wpt->latitude==0.0)||(std::abs(wpt->latitude)>90)||(std::abs(wpt->longitude)>180))||
           ((speed>maxspeed)||(speed<minspeed)))
        ) {
       if (global_opts.debug_level > 1) {
index 5b0b97cc2f9bf6fafdca86c6aefa0ee1a24d72e7..84879878394d14540dfb53b8badcb279173b69b3 100644 (file)
@@ -19,9 +19,9 @@
 
  */
 
-#include <math.h>
 
 #include "defs.h"
+#include <math.h>
 
 #define MYNAME "gpssim"
 
index 19ba02a232b18071dddacb7a3a26d8eff15c0f4e..245a3b3ee693a718c583a85b194555b67b9185de 100644 (file)
 
  */
 
-#include <math.h>
 
 #include "defs.h"
 #include "magellan.h"
+#include <cmath>
 
 static gbfile* file_in, *file_out;
 static short_handle mkshort_handle;
index 475b58a398240ffa56fa493c4278af6617c159fa..6e0528c3fc2f329aea354943d1f89c348a943f27 100644 (file)
 #include "garmin_fs.h"
 #include "garmin_tables.h"
 #include "src/core/logging.h"
-#include <math.h>
-#include <QtCore/QXmlStreamReader>
-static QXmlStreamReader* reader;
 #include "src/core/file.h"
 #include "src/core/xmlstreamwriter.h"
 #include "src/core/xmltag.h"
 
+#include <QtCore/QXmlStreamReader>
 #include <QtCore/QRegExp>
 #include <QtCore/QDateTime>
 #include <QtCore/QDebug>
 
+#include <math.h>
+
 
+static QXmlStreamReader* reader;
 static xml_tag* cur_tag;
 static QString cdatastr;
 static char* opt_logpoint = NULL;
index f2a01599f893e6e14f735d06517527da16172739..a29d69b3c887995fdf8c277c666b98cbeb815a40 100644 (file)
 
  */
 
+#include "defs.h"
+#include "grtcirc.h"
+
 #include <errno.h>
 #include <math.h>
 #include <stdio.h>
 
-#include "defs.h"
-#include "grtcirc.h"
-
 static const double EARTH_RAD = 6378137.0;
 
 static void crossproduct(double x1, double y1, double z1,
index 90bd8f22b5c6e385b66cff750e65d0856f6cf4d4..47c4311e30dd65a508873d3c03f805177ff4f059 100644 (file)
@@ -470,7 +470,7 @@ gtc_write(void)
 }
 
 void
-gtc_trk_s(const xg_string , const QXmlStreamAttributes*)
+gtc_trk_s(xg_string, const QXmlStreamAttributes*)
 {
   trk_head = route_head_alloc();
   track_add_head(trk_head);
index 967818a5f4b858873712d8213d1083b4a80a499e..d37f17dc7563c8438a8dc5c7e1467dc7994c2c85 100755 (executable)
@@ -1,85 +1,85 @@
-;
-; NOTE: setup.iss is generated from setup.iss.in via autoconf.
-; The generated setup.iss is checked in to help keep the version numbers
-; synchronized.
-;
-; Script for generating installation setup program for GPSBabel
-; Uses the Inno setup compiler.  Typically used from the command
-; line "makesetup.bat" which copies QT system files which
-; the Innosetup compiler cannot handle.  
-;
-; So it is not a good idea to run this file from the Inno Setup GUI.
-
-[Setup]
-; NOTE: The value of AppId uniquely identifies this application.
-; Do not use the same AppId value in installers for other applications.
-; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
-AppId={{1B8FE958-A304-4902-BF7A-4E2F0F5B7017}
-AppName=GPSBabel
-AppVerName=GPSBabel 1.5.1
-AppPublisher=GPSBabel
-AppPublisherURL=http://www.gpsbabel.org
-AppSupportURL=http://www.gpsbabel.org
-AppUpdatesURL=http://www.gpsbabel.org
-DefaultDirName={pf}\GPSBabel
-DefaultGroupName=GPSBabel
-OutputDir=release
-OutputBaseFilename=GPSBabel-1.5.1-Setup
-SetupIconFile=images\babel2.ico
-Compression=lzma
-SolidCompression=yes
-LicenseFile=COPYING.txt
-
-[Languages]
-Name: "english"; MessagesFile: "compiler:Default.isl"
-
-[Tasks]
-Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
-
-[Files]
-; This isn't as wreckless as it seems; these directories are populated on a
-; controlled way by the batch file.
-Source: qtdir\bin\*.dll;               DestDir: "{app}"; Flags: ignoreversion
-Source: qtdir\plugins\*;               DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs
-
-Source: gmapbase.html;                         DestDir: "{app}"; Flags: ignoreversion
-Source: qt.conf;                               DestDir: "{app}"; Flags: ignoreversion
-
-Source: \gpsbabel\gui\release\gpsbabelfe.exe;  DestDir: "{app}"; Flags: ignoreversion
-;Source: release\libexpat.dll;         DestDir: "{app}"; Flags: ignoreversion
-Source: \gpsbabel\gpsbabel\release\gpsbabel.exe;       DestDir: "{app}"; Flags: ignoreversion
-; Source: release\help\*;              DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs
-
-; Translation strings extracted from source code.  Include it in the dist
-; so that users can translate if they want to. 
-; Source: gpsbabel_*.ts;               DestDir: "{app}\translations"; Flags: ignoreversion 
-; Source: gpsbabelfe_*.ts;             DestDir: "{app}\translations"; Flags: ignoreversion 
-
-; Compiled translation strings that are used at runtime.
-; Source: gpsbabel_*.qm;               DestDir: "{app}\translations"; Flags: ignoreversion 
-Source: gpsbabelfe*.qm;                DestDir: "{app}\translations"; Flags: ignoreversion 
-
-; Now translations from Qt's own UI stuff.
-Source: qtdir\translations\*;                  DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs
-
-; Miscellaneous
-Source: COPYING.txt;                   DestDir: {app}; Flags: ignoreversion
-; Source: AUTHORS;                     DestDir: {app}; Flags: ignoreversion
-; Source: README.contrib;                      DestDir: {app}; Flags: ignoreversion
-; Source: README.gui;                  DestDir: {app}; Flags: ignoreversion
-
-
-; NOTE: Don't use "Flags: ignoreversion" on any shared system files
-
-[Icons]
-Name: "{group}\GPSBabel"; Filename: "{app}\gpsbabelfe.exe"
-Name: "{commondesktop}\GPSBabel"; Filename: "{app}\gpsbabelfe.exe"; Tasks: desktopicon
-
-[Run]
-Filename: "{app}\gpsbabelfe.exe"; Description: "{cm:LaunchProgram,GPSBabelFE}"; Flags: nowait postinstall skipifsilent
-
-[Registry]
-Root: HKCU; Subkey: "Software\GPSBabel"; Flags: uninsdeletekeyifempty
-Root: HKCU; Subkey: "Software\GPSBabel\GPSBabel"; Flags: uninsdeletekey
-Root: HKCU; Subkey: "Software\GPSBabel\GPSBabelFE"; Flags: uninsdeletekey
-
+;\r
+; NOTE: setup.iss is generated from setup.iss.in via autoconf.\r
+; The generated setup.iss is checked in to help keep the version numbers\r
+; synchronized.\r
+;\r
+; Script for generating installation setup program for GPSBabel\r
+; Uses the Inno setup compiler.  Typically used from the command\r
+; line "makesetup.bat" which copies QT system files which\r
+; the Innosetup compiler cannot handle.  \r
+;\r
+; So it is not a good idea to run this file from the Inno Setup GUI.\r
+\r
+[Setup]\r
+; NOTE: The value of AppId uniquely identifies this application.\r
+; Do not use the same AppId value in installers for other applications.\r
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)\r
+AppId={{1B8FE958-A304-4902-BF7A-4E2F0F5B7017}\r
+AppName=GPSBabel\r
+AppVerName=GPSBabel 1.5.1\r
+AppPublisher=GPSBabel\r
+AppPublisherURL=http://www.gpsbabel.org\r
+AppSupportURL=http://www.gpsbabel.org\r
+AppUpdatesURL=http://www.gpsbabel.org\r
+DefaultDirName={pf}\GPSBabel\r
+DefaultGroupName=GPSBabel\r
+OutputDir=release\r
+OutputBaseFilename=GPSBabel-1.5.1-Setup\r
+SetupIconFile=images\babel2.ico\r
+Compression=lzma\r
+SolidCompression=yes\r
+LicenseFile=COPYING.txt\r
+\r
+[Languages]\r
+Name: "english"; MessagesFile: "compiler:Default.isl"\r
+\r
+[Tasks]\r
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked\r
+\r
+[Files]\r
+; This isn't as wreckless as it seems; these directories are populated on a\r
+; controlled way by the batch file.\r
+Source: qtdir\bin\*.dll;               DestDir: "{app}"; Flags: ignoreversion\r
+Source: qtdir\plugins\*;               DestDir: "{app}\plugins"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+\r
+Source: gmapbase.html;                         DestDir: "{app}"; Flags: ignoreversion\r
+Source: qt.conf;                               DestDir: "{app}"; Flags: ignoreversion\r
+\r
+Source: \gpsbabel\gui\release\gpsbabelfe.exe;  DestDir: "{app}"; Flags: ignoreversion\r
+;Source: release\libexpat.dll;         DestDir: "{app}"; Flags: ignoreversion\r
+Source: \gpsbabel\gpsbabel\release\gpsbabel.exe;       DestDir: "{app}"; Flags: ignoreversion\r
+; Source: release\help\*;              DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+\r
+; Translation strings extracted from source code.  Include it in the dist\r
+; so that users can translate if they want to. \r
+; Source: gpsbabel_*.ts;               DestDir: "{app}\translations"; Flags: ignoreversion \r
+; Source: gpsbabelfe_*.ts;             DestDir: "{app}\translations"; Flags: ignoreversion \r
+\r
+; Compiled translation strings that are used at runtime.\r
+; Source: gpsbabel_*.qm;               DestDir: "{app}\translations"; Flags: ignoreversion \r
+Source: gpsbabelfe*.qm;                DestDir: "{app}\translations"; Flags: ignoreversion \r
+\r
+; Now translations from Qt's own UI stuff.\r
+Source: qtdir\translations\*;                  DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs\r
+\r
+; Miscellaneous\r
+Source: COPYING.txt;                   DestDir: {app}; Flags: ignoreversion\r
+; Source: AUTHORS;                     DestDir: {app}; Flags: ignoreversion\r
+; Source: README.contrib;                      DestDir: {app}; Flags: ignoreversion\r
+; Source: README.gui;                  DestDir: {app}; Flags: ignoreversion\r
+\r
+\r
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files\r
+\r
+[Icons]\r
+Name: "{group}\GPSBabel"; Filename: "{app}\gpsbabelfe.exe"\r
+Name: "{commondesktop}\GPSBabel"; Filename: "{app}\gpsbabelfe.exe"; Tasks: desktopicon\r
+\r
+[Run]\r
+Filename: "{app}\gpsbabelfe.exe"; Description: "{cm:LaunchProgram,GPSBabelFE}"; Flags: nowait postinstall skipifsilent\r
+\r
+[Registry]\r
+Root: HKCU; Subkey: "Software\GPSBabel"; Flags: uninsdeletekeyifempty\r
+Root: HKCU; Subkey: "Software\GPSBabel\GPSBabel"; Flags: uninsdeletekey\r
+Root: HKCU; Subkey: "Software\GPSBabel\GPSBabelFE"; Flags: uninsdeletekey\r
+\r
index 8b48d0a759a79e1373e53ebcc19a2bf570e4fb29..36a27f10b709ecce0e0b2e1d505cb3eda024c9ed 100644 (file)
 
  */
 
-#include <math.h>
 
 #include "defs.h"
 #include "filterdefs.h"
+#include <math.h>
 
 #define MYNAME "height"
 
index b6838251e63a7b64e861029ff2332003b7fdb1cd..8a91eb1969d9c41782edb121290b728c496d9614 100644 (file)
@@ -25,13 +25,9 @@ History:
 */
 /* This module is for the holux (gm-100) .wpo format */
 
-
-
-#include <ctype.h>
 #include "defs.h"
 #include "holux.h"
 
-
 static  gbfile* file_in, *file_out;
 static         unsigned char* HxWFile;
 static  short_handle mkshort_handle;
index 6c7265d1d1747e11d2b56327aeeb272719178ebe..0610599c6dcf1ff00f5ac6e8490eccc5264fcd72 100644 (file)
@@ -23,7 +23,6 @@
 #include "defs.h"
 #include "jeeps/gpsmath.h"
 #include "src/core/xmltag.h"
-#include <ctype.h>
 
 static gbfile* file_out;
 static short_handle mkshort_handle;
index 76168f73a72f08d22fb5b59315e4219ebe025f22..a3255f12aa025ef49518633e9f4229d8949ff2d6 100644 (file)
 
  */
 
-#include <ctype.h>
-#include <math.h>
-#include <string.h>
-#include <QtCore/QMap>
-
 #include "defs.h"
+#include <QtCore/QMap>
+#include <math.h>
 
 #define MYNAME "humminbird"
 
index c1feb527b54ab2d7f9d28a05227f2a1446c48622..e34a2f3c241c54db8adfcd94f68209a0c7c3c3d7 100644 (file)
  * 59 Temple Place - Suite 330, Boston, MA 02111 USA
  */
 
+#include "defs.h"
 #include <errno.h>
 #include <math.h>
 
-#include "defs.h"
-
 static gbfile* file_in, *file_out;
 static char manufacturer[4];
 static const route_head* head;
index 40ca97980889315b9d58abafd299eb867c044b01..c113c4c044cb57ba77289621cee5eb0a4735cc57 100644 (file)
        Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 */
 
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-
-#include <QtCore/QXmlStreamAttributes>
-
 #include "defs.h"
 #include "xmlgeneric.h"
+#include <QtCore/QXmlStreamAttributes>
 
 #define MYNAME "IGNRando"
 
index def2a286139518a77fb9eaa57c38c6443aeb7fcf..16db80f4d9d2ef16d2f8b8c4ac9ecd6a7d3b8f2c 100644 (file)
@@ -61,8 +61,6 @@
 
 */
 
-#include <ctype.h>
-#include <time.h>
 #include "defs.h"
 #include "cet.h"
 #include "cet_util.h"
index a45b5e7819c6272fc3ea9116aed69dcdfebc20fe..fd853ef721329cdce40e1a1ef42b718cd8c7f0f3 100644 (file)
 
 */
 
-#include <QtCore/QXmlStreamAttributes>
 
 #include "defs.h"
 #include "xmlgeneric.h"
+#include <QtCore/QXmlStreamAttributes>
 
 static arglist_t ikt_args[] = {
   ARG_TERMINATOR
index d63216b29e1e304cbf961aaaf2d716ede2ef82c2..8ff13a7725b2810808fc29e767b13747bcc4472f 100644 (file)
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 */
 
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "defs.h"
 #include "inifile.h"
 
index 9580585912f23c591cedfade94d83c3738997195..6d424186476842d6117175ca8081d66c8fcb038e 100644 (file)
@@ -30,9 +30,9 @@
 
  */
 #include "defs.h"
+#include "gbser.h"
 #include <ctype.h>
 #include <math.h>
-#include "gbser.h"
 
 #define MYNAME "itracku"
 
index ffb47fb06de454ff6427034d446ff069318a8ed7..ed43278eb248081ee830810d8fc60ada285fd3af 100644 (file)
 
 */
 
-#include <QtCore/QXmlStreamAttributes>
 
 #include "defs.h"
-#include "xmlgeneric.h"
-#include "jeeps/gpsmath.h"
 #include "garmin_tables.h"
+#include "jeeps/gpsmath.h"
+#include "xmlgeneric.h"
+#include <QtCore/QXmlStreamAttributes>
 
 static route_head* trk;
 
index c58a3225e7363857f4243955f4ebe3cef401617a..e8427d19902f099846d6a03bfc358b39331fb164 100644 (file)
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 
  */
-
-#include <ctype.h>
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
 #include "defs.h"
 #include "csv_util.h"
+#include <cmath>
 
 #define MYNAME "jtr"
 
index 2c83799929f034fe07971e0a973fc175eab4dc1a..8429f62aed4cd942e5ec7165b46cab87329b07e2 100644 (file)
@@ -19,9 +19,6 @@
        Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 
  */
-#include <math.h>
-#include <QtCore/QRegExp>
-#include <QtCore/QXmlStreamAttributes>
 
 #ifdef __WIN32__
 # include <windows.h>
 #include "defs.h"
 #include "xmlgeneric.h"
 #include "grtcirc.h"
-
 #include "src/core/file.h"
 #include "src/core/xmlstreamwriter.h"
 #include "src/core/xmltag.h"
+#include <QtCore/QRegExp>
+#include <QtCore/QXmlStreamAttributes>
+#include <math.h>
 
 // options
 static char* opt_deficon = NULL;
index 779914192ac8c957afccbbd5e953dad62b9846d4..2ec469ba349dad1fcfee2fc70f1c099e0fa86704 100644 (file)
  * we don't implement that at this time in GPSBabel.
  */
 
-#include <QtCore/QXmlStreamAttributes>
-
 #include "defs.h"
 #include "xmlgeneric.h"
+#include <QtCore/QXmlStreamAttributes>
 
 static gbfile* ofd;
 static Waypoint* wpt_tmp;
index d786d8ab28d886805a2df285ff3e467431c62916..a96bd4baed0c48b242c5e919167bcbf9e2ff6233 100644 (file)
@@ -33,8 +33,8 @@
 
 
 #include "defs.h"
-#include <string.h>
-#include <math.h> /* for lat/lon conversion */
+#include <QtCore/QDebug>
+#include <cmath> /* for lat/lon conversion */
 
 typedef struct lowranceusr_icon_mapping {
   const int    value;
@@ -435,7 +435,7 @@ lowranceusr_parse_waypt(Waypoint* wpt_tmp)
   // Version 3 has a depth field here.
   if (reading_version >= 3) {
     float depth_feet = gbfgetflt(file_in);
-    if (abs(depth_feet - 99999.0)  > .1) {
+    if (std::abs(depth_feet - 99999.0)  > .1) {
       WAYPT_SET(wpt_tmp, depth, FEET_TO_METERS(depth_feet));
     }
   }
index a6b59837b82038d6ef4e928178a026631e888b12..6a936f27b5f2a4dc5e2e51d1f53bdc307b4af7fa 100644 (file)
@@ -26,7 +26,6 @@
 
 
 #include "defs.h"
-#include <string.h>
 #include <math.h> /* for lat/lon conversion */
 #include <time.h> /* for gmtime */
 
index 1ba108a105b08afae8ccc980f9c3c9bed63e1e31..148b9cd42385557e94f7a471b93cf28c11d56858 100644 (file)
 
  */
 
-#include <ctype.h>
-#include <math.h>
-
-#include <QtCore/QXmlStreamAttributes>
-
 #include "defs.h"
 #include "csv_util.h"
 #include "xmlgeneric.h"
 #include "magellan.h"
+#include <QtCore/QXmlStreamAttributes>
+#include <cmath>
 
 #define MYNAME "maggeo"
 
index fb0d12374cd6b0a8fbdf0e1d4c088357b89a77e8..d513d16b4004b1c4593750197f79af710f72887f 100644 (file)
@@ -20,7 +20,6 @@
 
  */
 
-#include <ctype.h>
 #include <math.h>
 #include <time.h>
 
index 915c7dd5ec77a1c747f0283b8fd03ec7cae30b84..c948791a1db696d6ecf6ad650c61cdfd6428f3b8 100644 (file)
@@ -25,7 +25,7 @@
 #include <string.h>
 #include <time.h>
 #include "defs.h"
-#include "session.h"
+//#include "session.h"
 
 #define MYNAME "mapasia"
 
index f0320ac9223b7e5272d60e36d6135987044a7f4b..f662eaf5f68a203f73faabb22b90eee3744536b1 100644 (file)
 
  */
 #include "defs.h"
-
+#include "src/core/file.h"
+#include "src/core/xmlstreamwriter.h"
 #include <QtCore/QXmlStreamReader>
 #include <QtCore/QXmlStreamWriter>
 #include <QtCore/QDebug>
-#include "src/core/file.h"
-#include "src/core/xmlstreamwriter.h"
-
 
 static gpsbabel::File* oqfile;
 static QXmlStreamWriter* writer;
index 779241c7d2d7902ba091fbb2fcec9386f0b29cfa..271b49be04605ea724fff979ac79318db9056f00 100644 (file)
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
  */
 
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
-
 #include "defs.h"
 #include "mapsend.h"
 #include "magellan.h"
+#include <cmath>
 
 static gbfile* mapsend_file_in;
 static gbfile* mapsend_file_out;
index 0fb9f7955e28a0ed170207ae28cf4a4c2f1cda9a..5dea1d8469e625455e906601337699ec5e0a36a3 100644 (file)
 
 /* #define     MPS_DEBUG       0 */
 
-#include <stdio.h>
-#include <string.h>
-
 #include "defs.h"
 #include "garmin_tables.h"
 #include "jeeps/gpsmath.h"
-#include <ctype.h>
 
 static gbfile* mps_file_in;
 static gbfile* mps_file_out;
index 7032c03dfc759149e4f26884eb3c93c43da70676..d3ab9509a5380eee049212c5c8512d202eb5576b 100644 (file)
@@ -2,14 +2,14 @@
 // into our doc, http://www.gpsbabel.org/htmldoc-development/GarminIcons.html
 
 
-#include <stdarg.h>
-#include <stdio.h>
 #include "fatal.cc"
 #include "util.cc"
 #include "cet.cc"
 // #define VERSION "1"
 #include "globals.cc"
 #include "jeeps/gpsmath.cc"
+//#include <stdarg.h>
+//#include <stdio.h>
 
 
 
index 4beb77aac2fb881ce56a6b74277c7b0dbfa75fe3..9b4111446efccf7966ac5676ccb0520433f4a7a5 100644 (file)
 
  */
 
-/*
-    History:
-
-       2008/10/18: Initial release
-       2008/10/19: Don't write empty names
-                   Add options 'locked' and 'visible'
-       2008/11/06: Fix enumeration of objects for empty routes or tracks
-                   Add option "ver" (internal version) to writer
-                   We support write of version:
-                   * 0x11 - reported as " "Memory Map OS Edition 2004, Version 4.2.3 Build 432"
-                   * 0x12 - most files in my test pool :-)
-       2008/11/19: Fix routes with a loop but different start and end point
-       2008/12/12: Fix object release error
-       2010/09/10: Added read support for version 0x18
-                   (test file created by Memory-Map European Edition, Version 5.4.2, Build 1089).
-       2011/10/05: Fixed read support: Track, CurrentPosition, UTF-16 strings
-                   (test file is version 0x18 as written by GPS units running 5.4.4 build 1114).
-                   Strings now written in UTF-16 if necessary.
-*/
-
-#include <ctype.h>
-#include <errno.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
 #include "defs.h"
+#include <errno.h>
 
 #define MYNAME "mmo"
 
index 299fbfa92965f30f7ce4966e71e1b398728b5691..fd458343693fd6e1d300198a5633c1c4f209ad68 100644 (file)
@@ -36,12 +36,10 @@ Example usage::
 
 */
 
-#include <ctype.h>
-#include <time.h>
-#include <errno.h>
 
 #include "defs.h"
 #include "gbser.h"
+#include <errno.h>
 
 static route_head* track;
 
index 322cb7e3e8ebe690a92829ab9ddf3740c43c12b5..f48b3508f160447612021c8fa638010636973458 100644 (file)
 
  */
 
-#include <ctype.h>
-#include <errno.h>
-#include <math.h>
 
-#include <QtCore/QDir>
 
 #include "defs.h"
 #include "gbser.h"
 #include "gbfile.h" /* used for csv output */
+#include <QtCore/QDir>
+#include <errno.h>
+#include <math.h>
 
 #define MYNAME "mtk_logger"
 
index d93d72527e374503a2faa98ac7eb5708010d8cd7..bb3ab87fc64e580d801676f080ab0ddbc74de1c0 100644 (file)
@@ -20,9 +20,9 @@
 
  */
 
-#include <QtCore/QStringList>
-
 #include "defs.h"
+#include <QtCore/QDebug>
+#include <QtCore/QStringList>
 
 #define MYNAME "mynav"
 
@@ -48,25 +48,13 @@ typedef enum {
 static route_head* mynav_track;
 static gbfile* fin;
 
-//*******************************************************************************
+//***************************************************************************
 //           local helper functions
-//*******************************************************************************
+//***************************************************************************
 static void
-mynav_rd_line(char *buf)
+mynav_rd_line(QString line)
 {
-  Waypoint* wpt = NULL;
-  QStringList fields;
-  QString line;
-  bool ok;
-  int val_type;
-  int val_gps_valid;
-  double val_lat;
-  double val_lon;
-  double val_alt;
-  int val_time;
-  
-  line = buf;
-  fields = line.split("|");
+  QStringList fields = line.split("|");
 
   if (global_opts.debug_level > 1) {
     qDebug() << "line: " << line;
@@ -79,7 +67,8 @@ mynav_rd_line(char *buf)
     return;
 
   // only type 1 and type 5 lines contain coordinates
-  val_type = fields.at(fld_type).trimmed().toInt(&ok);  
+  bool ok = false;
+  int val_type = fields.at(fld_type).trimmed().toInt(&ok);  
   if (!ok)
     return;
   if (val_type != 1 && val_type != 5)
@@ -88,30 +77,30 @@ mynav_rd_line(char *buf)
   // This field is not present in .trc files, only in .ftn, so
   // ignore line if present and != 1
   if (fields.size() >= fld_gps_valid) {
-    val_gps_valid = fields.at(fld_gps_valid).trimmed().toInt(&ok);
+    int val_gps_valid = fields.at(fld_gps_valid).trimmed().toInt(&ok);
     if (!ok || val_gps_valid != 1)
       return;
   }
 
-  val_lon = fields.at(fld_lon).trimmed().toDouble(&ok) / 3600000.0;
+  double val_lon = fields.at(fld_lon).trimmed().toDouble(&ok) / 3600000.0;
   if (!ok)
     return;
-  val_lat = fields.at(fld_lat).trimmed().toDouble(&ok) / 3600000.0;
+  double val_lat = fields.at(fld_lat).trimmed().toDouble(&ok) / 3600000.0;
   if (!ok)
     return;
 
-  wpt = new Waypoint;
+  Waypoint* wpt = new Waypoint;
   wpt->latitude = val_lat;
   wpt->longitude = val_lon;
 
   if (fields.size() >= fld_altitude) {
-    val_alt = fields.at(fld_altitude).trimmed().toDouble(&ok);
+    double val_alt = fields.at(fld_altitude).trimmed().toDouble(&ok);
     if (ok)
       wpt->altitude = val_alt;
   }
 
   if (fields.size() >= fld_timestamp) {
-    val_time = fields.at(fld_timestamp).trimmed().toInt(&ok);
+    int val_time = fields.at(fld_timestamp).trimmed().toInt(&ok);
     if (ok)
       wpt->SetCreationTime(val_time);
   }
@@ -120,9 +109,9 @@ mynav_rd_line(char *buf)
 }
 
 
-//*******************************************************************************
+//***************************************************************************
 //           global callbacks called by gpsbabel main process
-//*******************************************************************************
+//***************************************************************************
 
 static void
 mynav_rd_init(const char* fname)
@@ -141,11 +130,11 @@ mynav_rd_deinit(void)
 static void 
 mynav_rd(void)
 {
-  char * buff;
-    
-  while ((buff = gbfgetstr(fin))) {
-    buff = lrtrim(buff);
-    if ((*buff == '\0') || (*buff == '#')) {
+  QString buff;
+
+  while ((buff = gbfgetstr(fin)), !buff.isNull()) {
+    buff = buff.trimmed();
+    if ((buff.isEmpty()) || (buff[0] == '#')) {
       continue;
     }
     mynav_rd_line(buff);
index e10e2bfd65ef7204ad68a23514bb6a40378a1653..02314c824c18fea665a119d2f6a10ad29f97458c 100644 (file)
 #include "defs.h"
 #include "csv_util.h"
 #include "jeeps/gpsmath.h"
-#include <ctype.h>
-#include <math.h>
 #include <QtCore/QDebug>
+#include <QtCore/QTextCodec>
+#include <math.h>
 
 #define MYNAME        "Naviguide"
 
 
-
-
-
-
 /************* Specific Naviguide data formats ****************/
 
 /* Naviguide file header */
index 1a5a79e435f8ae407bc4ef5e8290cb849380804e..0139c4a26f9142d1e663e2377d696b456262aa54 100644 (file)
@@ -347,19 +347,12 @@ read_packet(unsigned type, void* payload,
   return TRUE;
 }
 
-static time_t
+static QDateTime
 decode_datetime(const unsigned char* buffer)
 {
-  struct tm tm;
-
-  tm.tm_sec = buffer[5];
-  tm.tm_min = buffer[4];
-  tm.tm_hour = buffer[3];
-  tm.tm_mday = buffer[2];
-  tm.tm_mon = buffer[1] - 1;
-  tm.tm_year = buffer[0] + 100;
-
-  return mkgmtime(&tm);
+  QTime tm(buffer[3], buffer[4], buffer[5]);
+  QDate dt(2000 + buffer[0], buffer[1], buffer[2]);
+  return QDateTime(dt, tm, Qt::UTC);
 }
 
 static void
index 2d452c1def04002d6060b35e5089a73a773b1511..13a46eee33b9738e7ab946fddb0521081b7ceccb 100644 (file)
@@ -19,7 +19,6 @@
 
  */
 
-#include <ctype.h>
 #include "defs.h"
 #include "gbfile.h"
 #include "jeeps/gpsmath.h"
index 68223dee5062e614d5302a18625399ae1c4d6dd4..ec1739a75ce8c3af213728d90b46df27d666148e 100644 (file)
 
  */
 
-#include <ctype.h>
-#include <errno.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-
 #include "defs.h"
 #include "jeeps/gpsmath.h"
 #include "strptime.h"
+#include <math.h>
 
 /*
  * parse_distance:
index 7aff32e4240271a1073fca72a7e61744a397fb15..02c9b756ec640d5a8358d7630c2eb726aac93b15 100644 (file)
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 */
 
-#include <ctype.h>
-#include <math.h>
 
 #include "defs.h"
 #include "garmin_tables.h"
 #include "csv_util.h"
+#include <math.h>
 
 static gbfile* file_in, *file_out;
 static short_handle mkshort_handle;
index 96fa2bc34e34913b49532c7de8f7d1ed34b601e6..744747dbbbc7c417ee26e8c4351f92718cd00444 100644 (file)
 
  */
 
-#include <QtCore/QXmlStreamAttributes>
 
 #include "defs.h"
 #include "xmlgeneric.h"
+#include <QtCore/QXmlStreamAttributes>
 
 static int isFirst = 1;
 static route_head* route = NULL;
index 3af01914dafe6dd20751353868a4c0b5f471c84a..79066e7ee197cc14de1d184d88ad9cee55847097 100644 (file)
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 
  */
-#include <math.h>
 
 #include "defs.h"
 #include "filterdefs.h"
 #include "grtcirc.h"
+#include <math.h>
 
 #if FILTERS_ENABLED
 
index afcafdc48fb95b7a51d80e1afe85d1da7db811bb..53562c04e40d8bfae11395b96ef30f6aa364b4e1 100644 (file)
@@ -19,9 +19,6 @@
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
  */
 
-#include <stdio.h>
-#include <string.h>
-
 #include "defs.h"
 #include "garmin_tables.h"
 #include <ctype.h>
index 7cbff5dd622faf8aff36234fde691e46ee131511..7a21998f2c3d27e6c801dc01ab93d17c276f6a27 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include "queue.h"
-#include "stddef.h"
+#include <stddef.h>
 
 void
 enqueue(queue* new_el, queue* old)
index e01ce71093f1c537bcf7541f98d41c57aae9a55c..0350357d4a27a8a79a5336247ba9dc9b7dc40980 100644 (file)
 
  */
 
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
 
 #define MYNAME "saroute"
 #include "defs.h"
 #include "grtcirc.h"
+#include <stddef.h>
 
 gbfile* infile;
 
index 08d3710432a30de48e20d854c66d2e1f78eb1046..d19c3c7d5b4d5375ea7afa6cc76b05720ac6fc36 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "defs.h"
 #include "navilink.h"
-#include <ctype.h>
 
 #define MYNAME "sbn"
 
index 79734a4f5dde1cbbd3272e26314d3533eeb548be..0f4367da4b71b50d0100ec5e86dfbb88919836cc 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "defs.h"
 #include "navilink.h"
-#include <ctype.h>
 
 #define MYNAME "sbp"
 
index 954bc1d194d8692e9a62dc99f9e408cd84e05e0a..dad6e980841aa53e2b1c0bd558d968e95c194955 100644 (file)
  */
 
 
-#include <ctype.h>
-#include <math.h>
-#include <time.h>
 
 #include "defs.h"
+#include <math.h>
 
 #define MYNAME "skyforce"
 
index 081c06b8d0a96e8f9da9d026e9e08e1fb5d562e5..0e9194ca788f8d320277ff39a12629c3fef86a10 100644 (file)
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
  */
 
-#include <ctype.h>
-#include <math.h>
-
 #include "defs.h"
 #include "gbser.h"
+#include <math.h>
 
 #define MYNAME "skytraq"
 
index 3a0e4148d404582194dc4d6fe60f2a56d9227d17..3b2a324a0790fa1c23b5ee5e736fd4abb147145b 100644 (file)
 
 #if CSVFMTS_ENABLED
 
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "csv_util.h"
 #include "strptime.h"
 #include "jeeps/gpsmath.h"
index 3f8f819129e8e9648a294e264bcf777f53d03f4c..3660130e7534a59fcb4af1596c311ae716b9531e 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 #include "defs.h"
-#include <time.h>
 
 #define MYNAME "subrip"
 
index b6350e68d2188cc959252d77befc7c2ad53229ba..209442bc96c4192fb9e364d702468c01a39c4008 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "defs.h"
 #include "filterdefs.h"
-#include <ctype.h>
 
 #define MYNAME "swapdata"
 
index 702d13df6ad7472a630224d7c2d010a2880fc579..b81279167ea66c437e653cd7eb35aeca7dba8a1f 100644 (file)
 
  */
 
-#include <math.h>
-
 #include "defs.h"
 #include "csv_util.h"
+#include <math.h>
 
 static gbfile* file_in, *file_out;
 static short_handle mkshort_handle;
index 1875b4964df7bb67474beca33ba098d9eb926b7d..0ae20fa5fcad32897cf78684078c6cad425feb72 100644 (file)
@@ -34,7 +34,6 @@
 
 #include "defs.h"
 #include "csv_util.h"
-#include <ctype.h>
 
 #define MYNAME "TMPro"
 
index 4655245f439d1d12190957a89f0ced2fafd30e47..0c399591faf55351557cc295b747b07fe01e419d 100644 (file)
@@ -23,8 +23,6 @@
  */
 
 #include "defs.h"
-#include <string.h>
-#include <ctype.h>
 #include "jeeps/gpsmath.h" /* for datum conversions */
 
 #define MYNAME "TPG"
index 1e1bdaafd04c3db122ced26477725cf2bb7981dd..d7cfc765bd072071110c7ca371f36c0f13651527 100644 (file)
     3.x     "recreation"
 */
 
-#include <ctype.h>
-#include <math.h>
-#include <string.h>
 
 #include "defs.h"
 #include "jeeps/gpsmath.h" /* for datum conversions */
+#include <cmath>
 
 #define MYNAME "TPO"
 
index b526ddf210ea4a40cd262b094630fba914c32614..0439bcac7379031eb45ca5bc236bc0f745adc4bb 100644 (file)
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 
  */
-/*
-   2005-07-20: implemented interval option from Etienne Tasse
-   2005-07-26: implemented range option
-   2005-07-26: implemented move option
-   2005-07-26: implemented merge option
-   2005-07-29: warning fixes
-   2005-08-01: Add 'static' qualifier when we can (robertl)
-   2005-10-04: Add filterdefs to hold protos for filter functions... (robertl)
-   2005-10-04: Fix range-check max. value; exit filter, if no more tracks left
-   2006-04-06: Add fix, course, and speed options (parkrrrr)
-   2006-06-01: Add name option
-   2007-01-08: if not really needed disable check for valid timestamps
-       (based on patch from Vladimir Kondratiev)
-   2007-07-26: Allow 'range' together with trackpoints without timestamp
-   2010-06-02: Add specified timestamp to each trackpoint (added by sven_luzar)
-   2012-05-04: Added 'discard' option to 'merge' to throw out track points without timestamp
-*/
-
-#include <ctype.h>
-#include <math.h>
 
-#include <QtCore/QRegExp>
-#include <QtCore/QXmlStreamAttributes>
 
 #include "defs.h"
 #include "filterdefs.h"
-#include "strptime.h"
 #include "grtcirc.h"
+#include "strptime.h"
 #include "xmlgeneric.h"
+#include <QtCore/QRegExp>
+#include <QtCore/QXmlStreamAttributes>
+#include <cmath>
 
 #if FILTERS_ENABLED || MINIMAL_FILTERS
 #define MYNAME "trackfilter"
@@ -1144,9 +1125,9 @@ trackfilter_points_are_same(const Waypoint* wpta, const Waypoint* wptb)
   // reasonable tradeoff.
 
   return
-    fabs(wpta->latitude - wptb->latitude) < .00001 &&
-    fabs(wpta->longitude - wptb->longitude) < .00001 &&
-    abs(wpta->altitude - wptb->altitude) < 20 &&
+    std::abs(wpta->latitude - wptb->latitude) < .00001 &&
+    std::abs(wpta->longitude - wptb->longitude) < .00001 &&
+    std::abs(wpta->altitude - wptb->altitude) < 20 &&
     (WAYPT_HAS(wpta,course) == WAYPT_HAS(wptb,course)) &&
     (wpta->course == wptb->course) &&
     (wpta->speed == wptb->speed) &&
index d729287503d0941d8b4380edb9e0b8374afb4f31..aa8c030f315b1f6fe22c47aabd9de268bf53ba69 100644 (file)
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 */
 
-#include <math.h>
-#include <string.h>
-#include <time.h>
-
 #include "defs.h"
 #include "cet.h"
-#include "cet_util.h"
 #include "csv_util.h"
 #include "garmin_fs.h"
 #include "garmin_tables.h"
 #include "jeeps/gpsmath.h"
+#include <QtCore/QVector>
+#include <cmath>
 
 #define MYNAME "unicsv"
 
index fdf6568038e7d9bc8456d255b6f386ae2950dc03..0e7d860fbbd62130076740169c17add9455e0cf5 100644 (file)
@@ -180,30 +180,25 @@ v900_rd_deinit(void)
   }
 }
 
-
 /* copied from dg-100.c - slight (incompatible) modification to how the date parameter is used */
-static time_t
-bintime2utc(int date, int time)
-{
-  struct tm gpstime;
-
-  gpstime.tm_sec   = time % 100;
+QDateTime
+bintime2utc(int date, int time) {
+  int secs = time % 100;
   time /= 100;
-  gpstime.tm_min   = time % 100;
+  int mins = time % 100;
   time /= 100;
-  gpstime.tm_hour  = time;
+  // What's left in 'time' is hours, ranged 0-23.
+  QTime tm(time, mins, secs);
 
-  /*
-   * GPS year: 2000+; struct tm year: 1900+
-   * GPS month: 1-12, struct tm month: 0-11
-   */
-  gpstime.tm_mday  = date % 100;
-  date /= 100;
-  gpstime.tm_mon   = date % 100 - 1;
+  // 'date' starts at 2000 and is YYMMDD
+  int day = date % 100;
   date /= 100;
-  gpstime.tm_year  = date + 100;
-
-  return(mkgmtime(&gpstime));
+  int month = date % 100;
+  date /= 100; 
+  // What's left in 'date' is year.
+  QDate dt(date + 2000, month, day);
+  
+  return QDateTime(dt, tm, Qt::UTC);
 }
 
 static void
index c94d9e39bbbc65eb84bedc79d89b5d9df605b8c0..b29b6fdfc9839a52fabb5cee93cb34b87c902468 100644 (file)
 
  */
 
-#include <stdio.h>
 #include "defs.h"
 #include "csv_util.h"
 #include "inifile.h"
 #include "gbversion.h"
+#include <stdio.h>
 
 #define MYNAME "vecs.c"
 
index 8ecc9cb4ee6098af403b54266ffd348ea95d5773..cc66ba61a6c745e3eda5917f0391007412976ff3 100644 (file)
@@ -32,7 +32,6 @@ struct
 */
 
 #include "defs.h"
-#include <ctype.h>
 #include <math.h>
 
 #define MYNAME "vidaone"
index 041f414a0b323363507db6bf55d18500fea53a77..41f0d9d27b405a859659d1e63b1c6912b812d289 100644 (file)
 
  */
 
+#include "defs.h"
+#include "grtcirc.h"
+#include <cmath>
 #include <errno.h>
-#include <math.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
 
 #define MYNAME "vitosmt"
-#include "defs.h"
-#include "grtcirc.h"
 
 static gbfile*                         infile  =NULL;
 static gbfile*                         ofs     =NULL;
index 0157311134f143176be4014e81f5fd1c9f031c54..124742af2949c523bf8bf7d16f120155c065c413 100644 (file)
 
  */
 
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <math.h>
+#include "defs.h"
+#include <cmath>
 
 #define MYNAME "vitovtt"
-#include "defs.h"
 
 #define TM_YEAR_ZERO   1900
 #define TM_MONTH_ZERO  1
index 53242c1012255f8922f1199d724514b2ede8765c..0feb76d87484ac4d42eb30f97af7037c36469c95 100644 (file)
@@ -107,11 +107,9 @@ C - Checksum
  */
 
 #include "defs.h"
-#include <ctype.h>
 
 #define MYNAME "vpl"
 
-
 void vpl_parse_75_sentence(const char*);
 
 static
index 612c8ba523e404893644d4628ddd06e7c14e7460..aa80eb11ae6b8c290cf863bad3b37af933091a49 100644 (file)
 
  */
 
-#include <stdio.h>
-#include <math.h>
-#include <QtCore/QDebug>
-#include <QtCore/QList>
-
 #include "defs.h"
 #include "cet_util.h"
 #include "grtcirc.h"
 #include "garmin_fs.h"
 #include "session.h"
 #include "src/core/logging.h"
+#include <QtCore/QDebug>
+#include <QtCore/QList>
+#include <stdio.h>
+#include <math.h>
 
 #if NEWQ
 QList<Waypoint*> waypt_list;
index f9ef2a6c493e182e6f6e8001a4a5a570cd112241..060e94196763ac151f0166b504b0534fff19b9e9 100644 (file)
@@ -21,7 +21,6 @@
 #include "defs.h"
 #include "gbser.h"
 #include "grtcirc.h"
-#include <errno.h>
 
 #define MYNAME      "WBT-100/200"
 #define NL          "\x0D\x0A"
index b23f22badcbdf75c2487eb77bae04e91ef85d71d..d8a5c106ec802897e32e6f54a7cf9a0104789fed 100644 (file)
 
  */
 
-#include <QtCore/QXmlStreamAttributes>
-
 #include "defs.h"
 #include "xmlgeneric.h"
+#include <QtCore/QXmlStreamAttributes>
 
 /* argument storage */
 static char*   aicicon =0;
index 7acaaafe275ec640c5b059495e8b63ec5d93d1a3..c7a123be26847be4b2f1a30642be4951e90d6267 100644 (file)
 
  */
 
+#include "defs.h"
+#include "xmlgeneric.h"
+#include "cet_util.h"
+#include "src/core/file.h"
+
 #include <QtCore/QByteArray>
 #include <QtCore/QDebug>
 #include <QtCore/QTextCodec>
 #include <QtCore/QXmlStreamAttributes>
 #include <QtCore/QXmlStreamReader>
 
-#include "defs.h"
-#include "xmlgeneric.h"
-#include "cet_util.h"
-#include "src/core/file.h"
-
 #define DEBUG_TAG 0
 #if DEBUG_TAG
 #include <QtCore/QDebug>
index 784a5f5d2097d44a8d65eb0c7f9c78a1a36354f2..675a517f943f61e1ef70c5103f24fd083d6072bc 100644 (file)
@@ -27,6 +27,7 @@ typedef enum {
   cb_end,
 } xg_cb_type;
 
+class QXmlStreamAttributes;
 typedef void (xg_callback)(xg_string, const QXmlStreamAttributes*);
 
 typedef struct xg_tag_mapping {
index 56e446b71fff782863da7cb59199dd0808ac711e..22578f5261d6cf9c311f7eb439c4a9110a958dc7 100644 (file)
 
  */
 
+#include "defs.h"
+#include "src/core/xmltag.h"
 #include <stddef.h>
 #include <stdio.h>
 #include <string.h>
 
-#include "defs.h"
-#include "src/core/xmltag.h"
-
 static void
 free_xml_tag(xml_tag* tag)
 {
index 3829bc2a6e56e7b40fdaae145c4498caf14da440..4603807484790b3076cfc2ad7b0a542138add18a 100644 (file)
 
 */
 
-#include <QtCore/QXmlStreamAttributes>
-
 #include "defs.h"
 #include "xmlgeneric.h"
 #include "jeeps/gpsmath.h"
 #include "garmin_tables.h"
+#include <QtCore/QXmlStreamAttributes>
 
 static Waypoint* wpt;
 static route_head* trk;
index 47823d25312bf2ec1bc987b54b99fab9cacd8407..9aec81cb453bbebdbbb617b305cd139aa13b745b 100644 (file)
 
  */
 
-#include <QtCore/QXmlStreamAttributes>
-
 #include "defs.h"
 #include "xmlgeneric.h"
+#include <QtCore/QXmlStreamAttributes>
 
 static Waypoint* wpt_tmp;
 static char* as;